package top.lwaiting.service.impl;

import org.springframework.stereotype.Service;
import top.lwaiting.bean.OrderBean;
import top.lwaiting.service.OrderService;

import java.math.BigDecimal;

/**
 * @Description TODO
 * @ClassName OrderServiceImpl
 * @Author Yang
 * @Date 2025/5/28 18:02
 * @Version 1.0
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Override
    public OrderBean createOrder(Long productId, Long userId) {
        OrderBean orderBean = new OrderBean();
        orderBean.setId(1L);
        // TODO 总金额，需要计算 远程调用查询
        orderBean.setTotalAmount(new BigDecimal(100));
        orderBean.setUserId(userId);
        orderBean.setNickName("LWAITING");
        orderBean.setAddress("贵州贵阳");
        // TODO 远程调用查询商品列表
        orderBean.setProductList(null);
        return orderBean;
    }
}
